{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[('#IAQJNW', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQJNS', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQJNR', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQJHW', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQJHS', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQJHL', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQJ7O', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQF8J', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ8F8', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ8EQ', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ190', 0, None, 1, \"Issue('no':#IALTJB, 'title':[安全问题]: [漏洞] [master] CVE-2024-42302, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IALTJB?from=project-issue, 'state':已完成, 'cve':CVE-2024-42302, 'targetId':17814215)\\n\", 1, '有效漏洞，', 0, None, 0, None), ('#IAQ18Z', 0, None, 1, \"Issue('no':#IALTJB, 'title':[安全问题]: [漏洞] [master] CVE-2024-42302, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IALTJB?from=project-issue, 'state':已完成, 'cve':CVE-2024-42302, 'targetId':17814215)\\n\", 1, '有效漏洞，', 0, None, 0, None), ('#IAQ18X', 0, None, 1, \"Issue('no':#IALTJB, 'title':[安全问题]: [漏洞] [master] CVE-2024-42302, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IALTJB?from=project-issue, 'state':已完成, 'cve':CVE-2024-42302, 'targetId':17814215)\\n\", 1, '有效漏洞，', 0, None, 0, None), ('#IAQ18T', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ18S', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ18O', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ18I', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ187', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ17P', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ16Z', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ16Y', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ16W', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ16R', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ16P', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ16M', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ16H', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ16G', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ16F', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ16C', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ169', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ168', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ15F', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ15E', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ15D', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ158', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ157', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ156', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ14T', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ14R', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ14M', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ12T', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ12Q', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ12K', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ12G', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ12F', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQ12D', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ12A', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ128', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAQ125', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAPHM7', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAPHJM', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAPHI7', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAPCE3', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAPAM3', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP7Z6', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP7YQ', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP7YF', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP7Y9', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP7X6', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP7WJ', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP2G2', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP23B', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP221', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP0OQ', 0, None, 1, \"Issue('no':#I9VSJN, 'title':[安全问题]:  [漏洞] [master] CVE-2024-26937, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/I9VSJN?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-26937, 'targetId':16599875)\\n\", 0, None, 0, None, 0, None), ('#IAP0NW', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP0NC', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP0MB', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP0JD', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP0IQ', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP0GO', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAP0FQ', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAOZDM', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAOZ6V', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAONMW', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAONLG', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAOL69', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAOL1G', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAOKYP', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAOKYF', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAMX6Z', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAKN0G', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IA665I', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IARU3T', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IARTOJ', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IARTDP', 0, None, 1, '', 0, None, 0, None, 0, None), ('#IAR0BT', 0, None, 1, '', 1, '误报，CONFIG_USB_CXACRU && CONFIG_USB_ATM&&CONFIG_USB_CXACRU && CONFIG_USB_SPEEDTOUCH未开启 不涉及', 0, None, 0, None), ('#IAR0B8', 0, None, 1, '', 1, '误报，CONFIG_BME680未开启 不涉及', 0, None, 0, None), ('#IAR08A', 0, None, 1, '', 1, '误报，CONFIG_NILFS2_FS未开启 不涉及', 0, None, 0, None), ('#IAR06X', 0, None, 1, '', 1, '误报，CONFIG_DRM_PANEL_ILITEK_ILI9881C未开启 不涉及', 0, None, 0, None), ('#IAQXAB', 0, None, 1, '', 1, '误报，CONFIG_ARM_BRCMSTB_AVS_CPUFREQ未开启 不涉及', 0, None, 0, None), ('#IAQX8B', 0, None, 1, '', 1, '误报，CONFIG_VIDEO_GO7007未开启 不涉及', 0, None, 0, None), ('#IAQX7F', 0, None, 1, '', 1, '误报，CONFIG_BATTERY_BQ27XXX_I2C未开启 不涉及', 0, None, 0, None), ('#IAQX6X', 0, None, 1, '', 1, '误报，CONFIG_NILFS2_FS选项未开启 不涉及\\n', 0, None, 0, None), ('#IAQX6U', 0, None, 1, '', 1, '误报，CONFIG_HFS_FS未开启 不涉及', 0, None, 0, None), ('#IAQX4G', 0, None, 1, \"Issue('no':#I9VS8D, 'title':[安全问题]: [漏洞] [master] CVE-2024-27001, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/I9VS8D?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-27001, 'targetId':16599469)\\n\", 1, '误报，CONFIG_COMEDI_VMK80XX未开启 不涉及', 0, None, 0, None), ('#IAQX3D', 0, None, 1, '', 1, '', 0, None, 0, None), ('#IAQX2U', 0, None, 1, '', 1, '', 0, None, 0, None), ('#IAQX28', 0, None, 1, '', 1, '误报，CONFIG_RDS未开启 不涉及', 0, None, 0, None), ('#IAQX1S', 0, None, 1, '', 1, '误报，CONFIG_DRM_GMA500未开启 不涉及', 0, None, 0, None), ('#IAQX1T', 0, None, 1, '', 1, '误报，CONFIG_SPI_MT65XX未开启 不涉及', 0, None, 0, None), ('#IAQX14', 0, None, 1, '', 1, '误报，CONFIG_PARPORT未开启 不涉及', 0, None, 0, None), ('#IAQX11', 0, None, 1, '', 1, '误报，CONFIG_VIDEO_QCOM_VENUS未开启 不涉及', 0, None, 0, None), ('#IAQWZF', 0, None, 1, '', 1, '误报，CONFIG_DRM_QXL选项未开启，不涉及', 0, None, 0, None), ('#IAQWZE', 0, None, 1, '', 1, '误报，CONFIG_PARPORT未开启 不涉及', 0, None, 0, None), ('#IAQWY7', 0, None, 1, '', 1, '', 0, None, 0, None), ('#IAQWY1', 0, None, 1, '', 1, '误报，CONFIG_QCOM_PDR_HELPERS未开启 不涉及', 0, None, 0, None), ('#IAQWWV', 0, None, 1, '', 1, '', 0, None, 0, None), ('#IAQWWA', 0, None, 1, '', 1, '', 0, None, 0, None), ('#IAQWW3', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQWSZ', 0, None, 1, '', 1, '', 0, None, 0, None), ('#IAQWRG', 0, None, 1, '', 1, '', 0, None, 0, None), ('#IAQWQL', 0, None, 1, '', 1, '', 0, None, 0, None), ('#IAQWPK', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('#IAQWO0', 0, None, 1, '', 1, '误报，CONFIG_VIRT_WIFI选项未开启，不涉及\\n', 0, None, 0, None), ('#IAQWMB', 0, None, 1, '', 1, '误报，CONFIG_OBJAGG选项未开启，不涉及\\n', 0, None, 0, None), ('#IAQWKJ', 0, None, 1, '', 1, '误报，CONFIG_JFS_FS未开启 不涉及', 0, None, 0, None), ('#IAQWJN', 0, None, 1, '', 1, '误报，CONFIG_NF_TABLES未开启 不涉及', 0, None, 0, None), ('#IAQW3P', 0, None, 1, '', 1, '', 0, None, 0, None), ('#IAQW2R', 0, None, 1, '', 1, '误报，CONFIG_IPV6_SEG6_HMAC未开启 不涉及', 0, None, 0, None), ('#IAQVZQ', 0, None, 1, '', 1, '', 0, None, 0, None), ('#IAQVYZ', 0, None, 1, '', 1, '误报，CONFIG_BONDING未开启 不涉及', 0, None, 0, None), ('#IAQVXR', 0, None, 1, '', 1, '误报，CONFIG_NF_CONNTRACK_H323未开启  不涉及', 0, None, 0, None), ('#IAQVW5', 0, None, 1, '', 1, '误报，CONFIG_MMC_DAVINCI 未开启 不涉及', 0, None, 0, None), ('#IAQVUF', 0, None, 1, '', 1, '误报，CONFIG_BCACHE未开启 不涉及', 0, None, 0, None), ('#IAQVTD', 0, None, 1, '', 1, '误报，CONFIG_KGDB_KDB未开启 不涉及', 0, None, 0, None), ('#IAQVQF', 0, None, 1, '', 1, '误报，CONFIG_MD_RAID456未开启 不涉及', 0, None, 0, None), ('#IAQVPE', 0, None, 1, '', 1, '误报，CONFIG_DRM_AMDGPU未开启 不涉及', 0, None, 0, None), ('#IAQVND', 0, None, 1, \"Issue('no':#IAIKIO, 'title':【漏洞】 【master】 CVE-2024-26955, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IAIKIO?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-26955, 'targetId':17662560)\\n\", 1, '误报，CONFIG_NILFS2_FS未开启 不涉及', 0, None, 0, None), ('#IAQVLF', 0, None, 1, '', 1, '误报，CONFIG_NET_9P未开启 不涉及', 0, None, 0, None), ('#IAQVJA', 0, None, 1, '', 1, '误报，CONFIG_UML未开启 不涉及', 0, None, 0, None), ('#IAQVIA', 0, None, 1, '', 1, '误报，CONFIG_BPF_STREAM_PARSER未开启 不涉及', 0, None, 0, None), ('#IAQVFL', 0, None, 1, '', 1, '误报，CONFIG_S390未开启 不涉及', 0, None, 0, None), ('#IAQVEW', 0, None, 1, '', 1, '误报，CONFIG_GENEVE未开启 不涉及', 0, None, 0, None), ('#IAQVE8', 0, None, 1, '', 1, '误报，CONFIG_ENIC未开启 不涉及', 0, None, 0, None), ('#IAQVBA', 0, None, 1, '', 1, '误报，CONFIG_SOUNDWIRE_CADENCE未开启 不涉及', 0, None, 0, None), ('#IAQVA1', 0, None, 1, '', 1, '误报，CONFIG_SERIAL_MAX3100 未开启，不涉及', 0, None, 0, None), ('#IAQV78', 0, None, 1, '', 1, '误报，CONFIG_WIREGUARD未开启 不涉及', 0, None, 0, None), ('#IAQV6R', 0, None, 1, '', 1, '误报，CONFIG_STM未开启 不涉及', 0, None, 0, None), ('#IAQV02', 0, None, 1, '', 1, '误报，CONFIG_HSR未开启 不涉及', 0, None, 0, None), ('#IAQTSW', 0, None, 1, '', 1, '', 0, None, 0, None), ('#IAQTS3', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('#IAQTQD', 0, None, 1, '', 1, '', 0, None, 0, None), ('CVE-2024-43914', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48921', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-43883', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48931', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-43901', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-45016', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44940', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-43909', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48906', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-41040', 0, None, 1, \"Issue('no':#IAOKZ0, 'title':[安全问题]: 【安全】【CVSS 6.4】【CVE-2024-41040 】【OpenHarmony:kernel_linux_5.10 】, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IAOKZ0?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-41040, 'targetId':17943084)\\n\", 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48916', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48905', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-43893', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-43894', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48914', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-43886', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2021-47610', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48910', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-43906', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-41076', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-43904', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48900', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2021-4441', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44941', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-45025', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-38600', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-43903', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-42123', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-39468', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44938', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44958', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44982', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-45028', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-45009', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-46677', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-42286', 0, None, 1, \"Issue('no':#IAP0NC, 'title':[安全问题]: 【安全】漏洞CVE-2024-42286, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IAP0NC?from=project-issue, 'state':已完成, 'cve':CVE-2024-42286, 'targetId':17963400)\\n\", 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-46675', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44943', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-42136', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44948', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-41060', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-45003', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2023-52912', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-46798', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48901', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-45018', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2023-52916', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-43912', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-43895', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44968', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44950', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-43913', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44947', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-45008', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-46674', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48893', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48826', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48923', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44960', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-42253', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48902', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-45026', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-46673', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44939', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-1151', 0, None, 1, \"Issue('no':#I94PRN, 'title':[安全问题]: 【漏洞】 【master】CVE-2024-1151, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/I94PRN?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-1151, 'targetId':15336563)\\n\", 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-45015', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44952', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2023-52915', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-41066', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-46700', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2023-45896', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44988', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2022-48920', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44957', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-25741', 0, None, 1, \"Issue('no':#I94PT0, 'title':[安全问题]: 【漏洞】 【master】CVE-2024-25741, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/I94PT0?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-25741, 'targetId':15336612)\\n\", 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-42287', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-46800', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-45021', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2024-44954', 0, None, 1, '', 1, '有效漏洞', 0, None, 0, None), ('CVE-2023-52898', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('CVE-2024-42312', 0, None, 1, \"Issue('no':#IAQWPK, 'title':[安全问题]: 【OpenHamrony 5.0.0.41】【内核子系统】【ToC】【RK3568】【必现-10/10】【kernel_linux_5.10】【威胁等级】: 中CVE-2024-42312, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IAQWPK?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-42312, 'targetId':18051608)\\n\", 1, '有效漏洞，', 0, None, 0, None), ('CVE-2023-52893', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('CVE-2024-43879', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('CVE-2024-44969', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('CVE-2024-43880', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('CVE-2024-43834', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('CVE-2024-43830', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('CVE-2022-48896', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('CVE-2024-44965', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('CVE-2024-42304', 0, None, 1, \"Issue('no':#IAQWW3, 'title':[安全问题]: 【安全】【CVE-2024-42304】【OpenHarmony:kernel_linux_5.10 】, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IAQWW3?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-42304, 'targetId':18051843)\\n\", 1, '有效漏洞，', 0, None, 0, None), ('CVE-2023-52901', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('CVE-2023-52894', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None), ('CVE-2024-42292', 0, None, 1, '', 1, '有效漏洞，', 0, None, 0, None)]\n"
     ]
    }
   ],
   "source": [
    "import sqlite3\n",
    "def create_sqlite_database(filename):\n",
    "    \"\"\" create a database connection to an SQLite database \"\"\"\n",
    "    conn = None\n",
    "    try:\n",
    "        conn = sqlite3.connect(filename)\n",
    "        print(sqlite3.sqlite_version)\n",
    "    except sqlite3.Error as e:\n",
    "        print(e)\n",
    "    finally:\n",
    "        if conn:\n",
    "            conn.close()\n",
    "import AnalysisDao as analysisDao\n",
    "with sqlite3.connect(\"cve_process.db\") as conn:\n",
    "    t = analysisDao.get_all_analysis(conn)\n",
    "print(t)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "class Issue:\n",
    "    def __init__(self, title, url):\n",
    "        soup = getSoup(url)\n",
    "        self.no = getIssueNo(soup)\n",
    "        self.title = title\n",
    "        self.url = url\n",
    "        self.state = getIssueState(soup)\n",
    "        self.cve = getCVE(soup)\n",
    "        self.targetId = getIssueTargetId(soup)\n",
    "        \n",
    "    def __str__(self):\n",
    "         return \"Issue('no':{}, 'title':{}, 'url':{}, 'state':{}, 'cve':{}, 'targetType':{}, 'targetId':{}, 'commit':{})\".format(self.no, self.title, self.url, self.state, self.cve, self.targetType, self.targetId, self.commit)\n",
    " \n",
    "def create_tables():\n",
    "    None\n",
    "    sql_statements = [ \n",
    "        \"\"\"CREATE TABLE IF NOT EXISTS issue (\n",
    "            no TEXT PRIMARY KEY,\n",
    "            title TEXT NOT NULL,\n",
    "            url TEXT NOT NULL,\n",
    "            state TEXT NOT NULL,\n",
    "            cve TEXTL,\n",
    "            targetId TEXT NOT NULL\n",
    "        );\"\"\",\n",
    "        \"\"\"Create TABLE IF NOT EXISTS analysis (\n",
    "            no TEXT PRIMARY KEY,\n",
    "            excel boolean,\n",
    "            tableInfo TEXT,\n",
    "            gitee boolean,\n",
    "            giteeInfo TEXT,\n",
    "            ci boolean,\n",
    "            ciInfo TEXT,\n",
    "            config boolean,\n",
    "            configInfo TEXT,\n",
    "            introduced boolean,\n",
    "            introducedInfo TEXT\n",
    "        );\"\"\"]\n",
    "\n",
    "    # create a database connection\n",
    "    try:\n",
    "        with sqlite3.connect('cve_process.db') as conn:\n",
    "            cursor = conn.cursor()\n",
    "            for statement in sql_statements:\n",
    "                cursor.execute(statement)\n",
    "            conn.commit()\n",
    "    except sqlite3.Error as e:\n",
    "        print(e)\n",
    "def drop_tables():\n",
    "    None\n",
    "    sql_statements = [ \n",
    "        \"\"\"DROP TABLE IF EXISTS issue;\"\"\"]\n",
    "\n",
    "    # create a database connection\n",
    "    try:\n",
    "        with sqlite3.connect('cve_process.db') as conn:\n",
    "            cursor = conn.cursor()\n",
    "            for statement in sql_statements:\n",
    "                cursor.execute(statement)\n",
    "            conn.commit()\n",
    "    except sqlite3.Error as e:\n",
    "        print(e)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(0, 'cve_id', 'TEXT', 0, None, 1)\n",
      "(1, 'mainline_commitId', 'TEXT', 0, None, 0)\n",
      "(2, 'stable_commitId', 'TEXT', 0, None, 0)\n",
      "(3, 'title', 'TEXT', 0, None, 0)\n",
      "(4, 'fixes_commitId', 'TEXT', 0, None, 0)\n",
      "(5, 'cve_url', 'TEXT', 0, None, 0)\n"
     ]
    }
   ],
   "source": [
    "# create_tables()\n",
    "# 查看analaysis表的结构\n",
    "def show_analysis_table():\n",
    "    None\n",
    "    try:\n",
    "        with sqlite3.connect('cve_process.db') as conn:\n",
    "            cursor = conn.cursor()\n",
    "            cursor.execute(\"PRAGMA table_info(cve);\")\n",
    "            tables = cursor.fetchall()\n",
    "            for table in tables:\n",
    "                print(table)\n",
    "    except sqlite3.Error as e:\n",
    "        print(e)\n",
    "show_analysis_table()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "def add_issue(conn, issue):\n",
    "    sql = ''' INSERT INTO issue(no, title, url, state, cve, targetId)\n",
    "              VALUES(?,?,?,?,?,?) '''\n",
    "    cur = conn.cursor()\n",
    "    cur.execute(sql, (issue.no, issue.title, issue.url, issue.state, issue.cve, issue.targetId))\n",
    "    conn.commit()\n",
    "\n",
    "\n",
    "def get_all_issues(conn):\n",
    "    cur = conn.cursor()\n",
    "    cur.execute(\"SELECT * FROM issue\")\n",
    "    rows = cur.fetchall()\n",
    "    return rows"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('#IAQJNW', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQJNS', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQJNR', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQJHW', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQJHS', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQJHL', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQJ7O', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQF8J', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ8F8', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ8EQ', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ190', 0, None, 1, \"Issue('no':#IALTJB, 'title':[安全问题]: [漏洞] [master] CVE-2024-42302, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IALTJB?from=project-issue, 'state':已完成, 'cve':CVE-2024-42302, 'targetId':17814215)\\n\", 0, None, 0, None, 0, None)\n",
      "('#IAQ18Z', 0, None, 1, \"Issue('no':#IALTJB, 'title':[安全问题]: [漏洞] [master] CVE-2024-42302, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IALTJB?from=project-issue, 'state':已完成, 'cve':CVE-2024-42302, 'targetId':17814215)\\n\", 0, None, 0, None, 0, None)\n",
      "('#IAQ18X', 0, None, 1, \"Issue('no':#IALTJB, 'title':[安全问题]: [漏洞] [master] CVE-2024-42302, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/IALTJB?from=project-issue, 'state':已完成, 'cve':CVE-2024-42302, 'targetId':17814215)\\n\", 0, None, 0, None, 0, None)\n",
      "('#IAQ18T', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ18S', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ18O', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ18I', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ187', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ17P', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ16Z', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ16Y', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ16W', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ16R', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ16P', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ16M', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ16H', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ16G', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ16F', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ16C', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ169', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ168', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ15F', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ15E', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ15D', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ158', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ157', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ156', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ14T', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ14R', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ14M', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ12T', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ12Q', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ12K', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ12G', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ12F', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ12D', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ12A', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ128', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAQ125', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAPHM7', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAPHJM', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAPHI7', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAPCE3', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAPAM3', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP7Z6', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP7YQ', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP7YF', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP7Y9', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP7X6', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP7WJ', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP2G2', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP23B', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP221', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP0OQ', 0, None, 1, \"Issue('no':#I9VSJN, 'title':[安全问题]:  [漏洞] [master] CVE-2024-26937, 'url':https://gitee.com//openharmony/kernel_linux_5.10/issues/I9VSJN?from=project-issue, 'state':已拒绝, 'cve':CVE-2024-26937, 'targetId':16599875)\\n\", 0, None, 0, None, 0, None)\n",
      "('#IAP0NW', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP0NC', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP0MB', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP0JD', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP0IQ', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP0GO', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAP0FQ', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAOZDM', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAOZ6V', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAONMW', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAONLG', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAOL69', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAOL1G', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAOKYP', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAOKYF', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAMX6Z', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IAKN0G', 0, None, 1, '', 0, None, 0, None, 0, None)\n",
      "('#IA665I', 0, None, 1, '', 0, None, 0, None, 0, None)\n"
     ]
    }
   ],
   "source": [
    "import AnalysisDao as AnalysisDao\n",
    "import sqlite3\n",
    "with sqlite3.connect('cve_process.db') as conn:\n",
    "    a_l = AnalysisDao.get_all_analysis(conn)\n",
    "    for item in a_l:\n",
    "        print(item)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 定义枚举类型，表示analysis表中的字段\n",
    "class AnalysisType:\n",
    "    TABLE = 1\n",
    "    GITEE = 2\n",
    "    CI = 3\n",
    "    CONFIG = 4\n",
    "    INTRODUCED = 5\n",
    "# 插入数据到analysis表中，默认bool类型为False\n",
    "def add_analysis(conn, no):\n",
    "    sql = ''' INSERT INTO analysis(no, excel, gitee, ci, config, introduced)\n",
    "              VALUES(?,?,?,?,?,?) '''\n",
    "    cur = conn.cursor()\n",
    "    cur.execute(sql, (no, False, False, False, False, False))\n",
    "    conn.commit()\n",
    "# 根据AnalysisType，来更新表中添加不同的字段\n",
    "def update_analysis(conn, no, analysisType, value, info):\n",
    "    switcher = {\n",
    "        AnalysisType.EXCEL: \"EXCEl\",\n",
    "        AnalysisType.GITEE: \"gitee\",\n",
    "        AnalysisType.CI: \"ci\",\n",
    "        AnalysisType.CONFIG: \"config\",\n",
    "        AnalysisType.INTRODUCED: \"introduced\"\n",
    "    }\n",
    "    column = switcher.get(analysisType)\n",
    "    sql = ''' INSERT INTO analysis(no, {}, {}Info)\n",
    "              VALUES(?,?,?) '''.format(column, column)\n",
    "    cur = conn.cursor()\n",
    "    cur.execute(sql, (no, value, info))\n",
    "    conn.commit()\n",
    "# 根据no获取analysis表中的数据\n",
    "def get_analysis(conn, no):\n",
    "    cur = conn.cursor()\n",
    "    cur.execute(\"SELECT * FROM analysis WHERE no = ?\", (no,))\n",
    "    rows = cur.fetchall()\n",
    "    return rows\n",
    "# 获取所有的analysis表中的数据\n",
    "def get_all_analysis(conn):\n",
    "    cur = conn.cursor()\n",
    "    cur.execute(\"SELECT * FROM analysis\")\n",
    "    rows = cur.fetchall()\n",
    "    return rows"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
